<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%><%@ taglib prefix="c"				uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="decorator"		uri="http://www.opensymphony.com/sitemesh/decorator" 
%><%@ taglib prefix="page"			uri="http://www.opensymphony.com/sitemesh/page" 
%><%@ taglib prefix="fn" 		    uri="http://java.sun.com/jsp/jstl/functions"
%><%@ taglib prefix="lucy"		    uri="http://lucy.nhncorp.com/taglibs"
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<!-- 모바일 UX 가이드 변경에 따라  각 헤더 타이틀 지정 로직 추가 -->
<c:choose>
<c:when test="${channelName eq null or channelName eq ''}">
	<c:choose>
	<c:when test="${param.groupId eq '2'}"><c:set var="headerTitle" value="케이블" /></c:when>
	<c:when test="${param.groupId eq '3'}"><c:set var="headerTitle" value="스카이라이프" /></c:when>
	<c:when test="${param.groupId eq '9'}"><c:set var="headerTitle" value="해외위성" /></c:when>
	<c:when test="${title eq 'myList'}"><c:set var="headerTitle" value="마이채널" /></c:when>
	<c:otherwise><c:set var="headerTitle" value="지상파" /></c:otherwise>
	</c:choose>
</c:when>
<c:otherwise>
	<c:set var="headerTitle" value="${channelName}" />
</c:otherwise>
</c:choose>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <c:choose
    ><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_UNDER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_UNDER_iOS_4_2'  }"
        ><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />        
        <link rel="stylesheet" type="text/css" href="${path}/css/w.css?201112151" />
    </c:when
    ><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'ANDROID_WEBKIT' or REQUEST_MOBILE_BROWSER_TYPE eq 'DOLFIN'}"
        ><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi" />              
        <link rel="stylesheet" type="text/css" href="${path}/css/w.css?201112151" />
    </c:when
    ><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'OPERA'}"
        ><meta name="viewport" content="initial-scale=0.75, maximum-scale=0.75, minimum-scale=0.75, user-scalable=no" />     
        <link rel="stylesheet" type="text/css" href="${path}/css/w.css?201112151" />
    </c:when
    ><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'POLARIS'}"
        ><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi" />  
        <link rel="stylesheet" type="text/css" href="${path}/css/p.css?201112151" />
    </c:when
    ><c:otherwise
        ><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi" />  
        <link rel="stylesheet" type="text/css" href="${path}/css/w.css?201112151" />
        <link rel="stylesheet" type="text/css" href="${path}/css/e.css?201112151" />
    </c:otherwise>
</c:choose
	><title>${headerTitle } :: TV편성표</title>
	<link rel="shortcut icon" type="image/x-icon" href="<lucy:data name="service" path="mobile-service-url/favicon-url" />" />
  	<c:choose
    ><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_UNDER_iOS_4_2' }"
    ><link rel="apple-touch-icon-precomposed" size="114x114" href="<lucy:data name="service" path="mobile-service-url/epg-img-url" />/iphoneipod/tv_114X114_iphone4.png" />
    <link rel="apple-touch-icon-precomposed" href="<lucy:data name="service" path="mobile-service-url/epg-img-url" />/iphoneipod/tv_57X57_iphone3.png" />
    </c:when
    ><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_UNDER_iOS_4_2' }"
    ><link rel="apple-touch-icon-precomposed"  href="<lucy:data name="service" path="mobile-service-url/epg-img-url" />/ipad/tv_72X72_ipad.png" />   
    </c:when
    ><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'ANDROID_WEBKIT'}"
    ><link rel="apple-touch-icon-precomposed" href="<lucy:data name="service" path="mobile-service-url/news-img-url" />/broadcast-android-icon.png" />
    </c:when
    ></c:choose>
    <c:set var="path" value="${pageContext.request.contextPath}" />
</head>
<c:choose>	
	<c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_UNDER_iOS_4_2' }">
		<c:set var="bodyClassType" value="s" />
	</c:when>
	<c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_UNDER_iOS_4_2' }">
	   <c:set var="bodyClassType" value="s" />
	</c:when>
	<c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'ANDROID_WEBKIT'}">
		<c:set var="bodyClassType" value="a" />
	</c:when>
	<c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'DOLFIN'}">
		<c:set var="bodyClassType" value="d" />
	</c:when>
	<c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'OPERA'}">
		<c:set var="bodyClassType" value="o" />
	</c:when>
	<c:otherwise>
		<c:set var="bodyClassType" value="" />
	</c:otherwise>
</c:choose>

<body class="${bodyClassType}" <c:choose><c:when test="${REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'SAFARI_UNDER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_OVER_iOS_4_2' || REQUEST_MOBILE_BROWSER_TYPE eq 'IPAD_UNDER_iOS_4_2'  }">onload="setTimeout(function() { if (window.pageYOffset == 0) window.scrollTo(0, 1) }, 100);javascript:checkSelectedPosition();"</c:when><c:otherwise>onload="javascript:checkSelectedPosition();"</c:otherwise></c:choose>>
	<page:applyDecorator name="broadcast-top"></page:applyDecorator>
	<decorator:body></decorator:body>
	<page:applyDecorator name="broadcast-footer"></page:applyDecorator>
	<script type="text/javascript" language="javascript" src="${pageContext.request.contextPath}/js/cssquery.js?2011051001"></script>
    <script type="text/javascript" src="${path}/js/lcslog.js?2011051001"></script>
	<script type="text/javascript" src="${path}/js/nclk_nos.js?2011051901"></script>
	<script type="text/javascript" src="${path}/js/mobile.js?2011051001"></script>
	<script type="text/javascript" src="${path}/js/m.jindo2_100204.js?2011051001"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/splog_m.js?2011060701"></script>
	<script type="text/javascript">
	var ccsrv = "cc.naver.com";
    var nsc = "Mtvguide.all";

	var REQUEST_MOBILE_BROWSER_TYPE = "${REQUEST_MOBILE_BROWSER_TYPE}";
	var REQUEST_TELEPHONE_CORPORATION = "${REQUEST_TELEPHONE_CORPORATION}";
	var wfOnloadAttach = jindo.$Fn(function(){
        setTimeout(function() { if(window.pageYOffset == 0) window.scrollTo(0, 1) }, 100); 
    }).attach(window, "load");
	var wfUnloadAttach = jindo.$Fn(function(){
	       wfOnloadAttach.detach(window, "load");
	       wfUnloadAttach.detach(window, "unload");
	}).attach(window, "unload");
	BMR.run('http://sp.naver.com/sp');
	lcs_do();
	</script>
	<script type="text/javascript">
	function checkSelectedPosition(){
	    var selectedChannelClassBlock; 
	    var selectedClassNumber = '${selectedClassNumber}';
	    if (selectedClassNumber == null || selectedClassNumber == '') {
	        selectedClassNumber = 0;
	    }
	    selectedChannelClassBlock = document.getElementById('channelClass_' + selectedClassNumber);
	    if(selectedChannelClassBlock != null){
	        var selectedChannelName = selectedChannelClassBlock.innerHTML;
	        selectedChannelClassBlock.className = "on";
	        var spanText = document.getElementById('spanText');
	        if(spanText != null) {
	            spanText.innerHTML = selectedChannelName;
	            spanText.innerText = selectedChannelName;
	        }
	    }
	}
	
	function controlLayer() {
	    var layerDiv = document.getElementById('layer');
	    if (layerDiv != null) {
	        if (layerDiv.style.visibility == "visible") {
	            layerDiv.style.visibility = "hidden";
	        } else {
	            layerDiv.style.visibility = "visible";
	        }
	        
	        isPassedfunction = true;
	    }
	}
</script>
</body>
</html>